package com.chocho.producerserver.dao;

import com.chocho.producerserver.bean.QCollection;
import com.chocho.producerserver.bean.Visited;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * Created by chocho on 2022/4/12.
 */
@Mapper
@Repository
public interface VisitedDao {

    @Select("SELECT COUNT(visited_id) FROM op_visied")
    int count();

    @Insert("INSERT INTO op_visied (visited_id, visited_time, user_id, visited_url) " +
            "VALUES(#{visitedId}, #{visitedTime}, #{userId}, #{visitedUrl})")
    int insert(Visited visited);
}
